import { getRequest, postRequest } from '../request';
interface LoginForm {
    username: string
    password: string
    uuid: string
    code: string
  }
export const login = (data: LoginForm) => postRequest(`/login`, data) // 登录

export const logout = () => getRequest(`/login/logout`) // 退出登录

export const getCaptcha = () => getRequest(`/login/getCaptcha`) // 获取验证码

export const getLoginInfo = () => getRequest(`/login/getLoginInfo`) // 获取登录信息

export const refresh = () => getRequest(`/login/refresh`) // 刷新用户信息

export const sendLoginEmailCode = (loginName: any) => getRequest(`/login/sendEmailCode/${loginName}`) // 获取邮箱登录验证码

export const getTwoFactorLoginFlag = () => getRequest(`/login/getTwoFactorLoginFlag`) // 获取双因子登录标识

export const updateEmployeePassword = (param: any) => postRequest(`/employee/update/password`, param) // 修改密码